package com.api.chatai.ThreadLocal;

public class UserContextHolder {
    private static final ThreadLocal<Integer> currentUser = new ThreadLocal<>();

    public static void setUser(Integer id) {
        currentUser.set(id);
    }

    public static Integer getUser() {
        return currentUser.get();
    }

    public static void removeCurrentUser() {
        currentUser.remove();
    }
}